Thanks for pointing me to the relevant documentation! The basic idea makes more sense now.
And I have now managed to solve my problem. It was because one of my actions is called “dancing” but I also elsewhere had a thing called “ideaOf dancing”. This problem arose, or did not, depending on where I stated that the action of dancing is disconcerting, in relation to where I declared the “ideaOf dancing” thing.
I have learned my lesson previously not to call things “X of Y” because this can confuse the compiler. But it didn’t occur to me that if you have a thing called “X Y” then you may get problems if you then have an action kind called Y. But apparently you can.