TagProcessing: ensure that fosterParent gets applied before closeParent