The directory caching optimization that was added to fill_playlists (playlist.c) in 1.0.23 is broken. It gets completely confused by tracks with the same file name in different directories.
Consider this playlist, for example:
When this list is parsed, the tracks that actually get put in to the playlist are:
I.e. it uses the first directory for all of the tracks.
I am attaching a patch that appears to fix the problem for me. You'll see that it eliminates any concept of saving the last directory altogether and just looks for the complete pathname of the track in the database.