Move global constraint check into solve()