the documentation says visitPermittedSubClass is called before visitPermittedSubClass is actually called