only call indexOfObject: once when removing an object
Merge pull request #1 from jpsim/master

only call indexOfObject: once when removing an object