Just an update.
Boon was right. Oil had made its way into the loom plug behind the airbox. No signs of it making it any further. Cleaned it out and the problem is gone.
P1507 was caused by the iacv being stuck. Soaked it in CRC and loosened it up. After a running it a few times it appears to have freed up and idle is back to normal after a good run.