There are a few places in the code where we assume that something that's a ZReference is 'probably' a reference to something we allow in that context, and so let execution flow continue without de-referencing whether the type is allowed.
Similarly, we accept items whose type is an (unresolved) ZFunctionCall, where it's possible that the generated output isn't even a type.
Should we leave this as-is? Should be 'fix' it?