fix references to schemas that will be nested