Getting "isn't a valid subclass" errors"

Very useful fix - thanks!
My guess is that it works because the explicit cast tells the cooker that it needs to compile the class to which you’re casting before it can compile this one. I’m guessing that it doesn’t spot this otherwise, and can fail depending on your cook order. Interestingly, I was dealing with one of these just now that cooked fine on Mac and PS4, but failed on Win64 and Win32, which is what suggests to me that it arises as an accident of the cooking order.