Stuck compilcation error on Mac with 8M1

Just trying out the 8M1 build, but I have a problem where IntelliJ is refusing to release what looks like a cached compilation result.

I had a problem with a given file.
I edit the file to fix the problem, the right bar is all green.
Build -> Re-build Project
- I still get the same compilation error even though the source does not have the effected code in.
- I've check on disk, and the source file has been saved with the correct changes.
- I've deleted the IntelliJ output directory, and still get the problem.
- I've restarted IntelliJ, same problem.

So it looks like it has internally cached the source file it compiles, any where I can find this and clear it out?