Hi
I have exactly the same problem (in IntelliJ), I haven't spent the time to figure out exactly what the root cause is, but there is a workaround that you don't have to delete the cache for.
If you go to Project Structure, Libraries, and select the mapped snapshot, you can manually unlink the older sources which are mapped to the class file.
Eg see screenshot (after removing the extra/older source).
It's not perfect because when you refresh the gradle task it puts the old ones back in again, but it's not a big hassle.
-TGG