Fix typo in Container.remove

Fixes #2499