Fix manipulation APIs with removed elements
Merge pull request #459 from kpdecker/reentrant-remove

Fix manipulation APIs with removed elements