Automatically selects the correct child model in popups.