Fixed bugs with referenced types and validation

Referenced types weren't properly being re-used after
being constructed, partly because of how they were passed around.
Use class attribute to get around issubclass issues