Queue loop behavior when going to previous song

The queue behavior seems kind of odd when loop is enabled and somewhere along the road, you go back to a previous song in the queue.

Suppose you have selected a few songs and scheduled them for playback in the queue. Now also assume loop is enabled, meaning after the entire queue ends the same songs start all over again from the beginning.

The initial state of the (looped) queue is:

  • Song 1 <— currently played song
  • Song 2
  • Song 3
  • Song 4

Forward to the next song. The queue now looks like this:

  • Song 2 <-- currently played song
  • Song 3
  • Song 4
  • Song 1

Forward to the next song. The queue now looks like this:

  • Song 3 <-- currently played song
  • Song 4
  • Song 1
  • Song 2

So far so good… Now let’s go back in the queue to the previous song:

  • Song 2 <— currently played song
  • Song 3
  • Song 4
  • Song 1
  • Song 2

Let’s go back another time:

  • Song 1 <-- currently played song
  • Song 2
  • Song 3
  • Song 4
  • Song 1
  • Song 2

As you can see, Song 1 and 2 are now duplicated in the queue. If you would keep on doing this, the entire queue would be duplicated multiple times. The behavior I would expect is that each song would only occur once in the queue.