Yup, this was a bug and is getting fixed on the next 1.5 release candidate.
https://github.com/JuliaLang/julia/pull/36117