Support for subModelTypes as class references

Fixes #508