5.1 flac files play as stereo sometimes

Any time that I play a 5.1 file after a 2.0 file, it plays as stereo. If I stop the song, and then immediately resume playback, it plays correctly as 5.1. All subsequent 5.1 files will play just fine, until I play another 2.0 file. Then, 5.1 files start playing as 2.0 files again.

Audio output device is set to WASPI: default
Number of channels = 5.1
Passthrough output device = WASAPI: default

Running Kodi 16.1 in Windows 10 connected via HDMI to a Denon receiver.