Thanks for the reply. It sadly didn't fix the problem, though. I am getting the
exact same result. In fact, I had end caps like this in my original code and
removed them for the minimal example to make it as minimal as possible.
Admittedly, I wasn't aware that they are actually needed.