The mod takes care of wrapping at the top, but not when
decrementing 0. Fix this by using Array.prototype.at(),
which handles negative indexes.
Close https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/467
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/284>
(cherry picked from commit dd8ee2931a)