def _element_in_child_template(root, e):
    """
    detect if the element is trapped inside a nested bind: tag
    relative to e

    :type root: UIElement
    :type e: UIElement
    :rtype: bool
    """
    return any(x.typeid.startswith('bind:template') for x in root.path_to(e))