Fix for significant memory leak caused by not detaching node state from parent-state when disposing.