I just raised a bug KT-25359 but would like to know if anyone has a workaround for it.
I just upgraded from Kotlin 1.2.31 to 1.2.51 and kotlin serialisation 0.4.2 to 0.5.1. I upgraded because I was prompted to do so when upgrading to the latest kotlin IDEA plugin. My project compiled cleanly before but now I get the above error when I try and build (or rebuild) the project in IDEA. Note that the project compiles without problem when compiling from the command line using maven.
More details are in the bug report.