Fix #812: Protect deserialization IR hacks with IR version.