Bugfixes for heterogenous constraints refactor