Workaround for issue #13.

Use a flag to signal for recursive disposing, and return if it occurs.