flattened

Creates a flattened copy of this model using the given context to resolve parent models.