fixes #125 detaching nodes triggers $destroy

didn't have time to add the test suite showing the bug, but it's still passing.