Fixed a bug that wasn't updating all the references to a schema when a schema name is changed.