Correct handling of sort after related collection is already created