def has_precedent(seen, prefix):
    """
    Check if there is a seen node with a given prefix.
    No need to do this for suffixes as their precedent only ever checked
    for directly preceding.
    """
    return any([n.prefix is prefix for n in seen])