I just pushed a PR with a proper fix. I'm going to ask Vlad to check it over and offer feedback. My hope is to get this included in 5.3.0.Final and the next 5.2.x maintenance release.