This was a regression introduced by 7deeabc7c7 to address CVE-2019-14234. Thanks Tim Kleinschmidt for the report and Mariusz for the tests.
7deeabc7c7