Fix bug in horizontal motion through atomic ranges

Closes #1532