fix: removeBody raising an error with undefined agent (physics/PhysicsEngine)

Not to pass `i` of deleted agent to `detachFrom`.