media: Fix lock-against-self when cycling subtitle/audio tracks

Fixes #1846