Hey - I use to issue the licences at the CAA, so may be able to help. Although of course this info may have changed now.
Firstly as you say the IR is a rating and can be done in any state.
You are slightly wrong about the ATPL exams and CPL being completed in the same state. When I was at the CAA they would accept the JAR ATPL exams from any state to issue a UK JAR CPL, however you had to have done the CPL flight training and testing in a UK approved school to have the UK licence issued.
Logically if you wanted to do a Spanish JAR CPL, you'd have to speak to the Spanish licensing authority to ensure they'd accept your UK ATPL exam passes for their licence, and then compete a spanish approved JAR CPL course. Once you had the licence you can apply to any job requiring a JAR CPL - some companies require you to change the state of licence issue to the one that issues their AOC (BA and EJ is UK, RYR is IRE) and this is a paperwork exercise.
Come next year mind, when EASA licensing regulations come into effect, you won't be able to change state of licence issue I doubt, and each licence will be the EXACT same to obtain and maintain in each state. Therefore the need to change state will no longer exist, and you'll be stuck with whatever you've got at the time. This isn't a problem as the licence will be an EASA licence, but some authorities that issue the licence are more helpful then others etc.
Did this help?