H.265 decoding errors (works well with HEVC reference decoder)

Description

I've got a specific H.265 elementary stream file (see attachment) that can be decoded without any problems with the HEVC reference decoder from ​https://hevc.hhi.fraunhofer.de/. But when decoding with a current version of FFmpeg, frames 51 - 60 show massive decoding errors (picture almost completely gray). I'm using Zeranoe ffmpeg-20160316-git-d0a9114-win64-static but I could also reproduce with the released 2.8.6 version.

This is not invalid (a NAL unit can be preceded by arbitrarily many leading_zero_8bits or followed by arbitrarily many trailing_zero_8bits), but few streams make use of this "feature" so the decoder has not bothered to support it. The stream plays correctly on the current decoder if you remove all but three of the zero bytes.