Fix manipulation APIs with removed elements
Merge branch 'reentrant-remove'