Fix #2976 Do not add multiple models with same `id`

`add` is protected from this, but when using the `order` array to reorder models, we need to make sure multiple models with the same `id` aren't both pushed onto `order`.