Fix creating a subtype of a custom type