[Pass][Layout] Fix bug and add debug printing.

Fix a bug where if two atoms had the same index in the override map,
the compare would return false. It now goes to the next check when
they are equal.

No test because it currently can't be tested. An upcomming patch will test it.