--occupied doesn't work properly with --shifts -1

I have the following tags occupied: 3, 4, 9

The command below properly cycles between tags:

$ river-shifttags --shifts 1 --occupied --num-tags 10

When I am on tag 9, the below command will properly go to 4, then 3, but when I am on tag 3, then it will make me go to 2 and then to 1, which are both not occupied:

$ river-shifttags --shifts -1 --occupied --num-tags 10

This doesn't happen when I have tag 1 occupied, meaning that it works correctly over the gaps of unoccupied tags, but fails when there are no unoccupied tags left under the current one.