I managed to install pp in a virtual machine. The same script is converted correctly there, so it must be something with my pp install. I have used pp it a lot before and it always worked correctly; perhaps some files got corrupted. I will try and update/reinstall all the relevant modules.