    The elements are written when the top level context is left.

        This is for code compatibility only as it is quite slow.
        TN