Fixed several cases where the new map boundary snap code would fail.