Better scoping for generated models.