Don't mutate the input schema when making the schema strict.

This was causing a problem with an endpoint definition that listed
multiple versions, as the same schema got made strict multiple times.