Merging Models recursively

This pull request fixes #2624