fix creation of nested anonymous models.