sml: record the origin of a referenced model
sml: update model references when merging