Fix #2624 - recursively merge nested models