Play position in queue is incorrect after track deletion

I’m running version 2.502 both on a RPi3 and on an x86 virtual machine (Virtualbox), and both exhibit the same problem:

When a change is made to the play queue, the play position is not updated. For example, if track 4 is playing, after deleting track 0 then what was track 4 before is now track 3, yet the currently playing position is not updated (i.e. the structure returned by pushState still has 4 in the position field). Consequently, the queue page of the web interface shows the wrong track as currently playing.