I always worry about these casts to `EntityInternal` - how do we know they're safe, and if they are, why can't we have a `getInternal()` method or something similar?