Fix bad index lookups in remove and update

When passed the ID of an item, `collection.remove` and `collection.update` finds the item in the collection via `collection[itemOrId]`, which doesn't appear to be correct as `collection` is an array and `itemOrId` is the ID of the item at an unknown index. This pull request patches these methods to use `collection[indexes[itemOrId]]` instead.