Proper fix for Anchor and TreeLabel to clear state after the current tag is finished