fix issue updating inverses when merging models with lazy references