Only for the purposes of the IR. ie the 7 year rule kicks in. That IR doesn't need to be a JAR/EASA one either it can be any ICAO IR.
After the 36 months the exams would not be valid for doing a CPL even if you held an IR for that period. You couldn't then just go and do the CPL theory exams and everything be normal. You could I suppose do CPL theory but you wouldn't be able to upgrade it later, there are also some rules about multicrew type ratings which I don't know about because they have never applied to me.
You need to have ATPL theory valid when you pass the CPL and the IR for the license to be able to be used later on for ATPL issue and I think also for flying MPA (but would need to check)