Thanks for reporting this and helping me debug the solution. Commit 706055ce526ecd141030ea93bddf940bb955ae72 added a test for this, so am now closing. This bug was fixed in 5.24, but re-broken recently, and fixed finally by ffdde3068076349ae00c2cd96695f84a7ace347d -- Karl Williamson --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=127708