This assert doesn't consider reference storage types in its predicate. Look through them since they're not relevant to the type consistency check it's trying to pick out.