The issue was that instantiate_mvars(infer(m)) had a metavariable, while infer(instantiate_mvars(m)) did not. Changing the call from assign to is_def_eq also unifies the type, assigning the metavariable inside the type.
test
build
doxygen src/Doxyfile