After 2 days of messing about I have finally found the reason for this error, so I shall post my fix for all those who may stumble across the same issue.
All you have to do is go into your main project folder and move/delete any pre-compiled *.sof and *.ptf files from it, including any backup versions you may have under the same name. While you are at it you can also delete the .sopc_builder folder as well as the sopc builder will re-generate that file when you run it again.
Rebuild the IP in sopc builder, rebuild the hardware in Quartus.
Launch Nios II and do a clean and a build.
I hope this may help anyone who is stuck with the same compiler error.