Petar Tahchiev could you create a PR with a test case? That would be a first step.
I'll put the issue in the 5.3 queue so that we don't forget about it.