Ensure there are no Traverse / Backtrack / Recurse blocks after an OutputSource block.

def _sanity_check_output_source_follower_blocks(ir_blocks):
    """Ensure there are no Traverse / Backtrack / Recurse blocks after an OutputSource block."""
    seen_output_source = False
    for block in ir_blocks:
        if isinstance(block, OutputSource):
            seen_output_source = True
        elif seen_output_source:
            if isinstance(block, (Backtrack, Traverse, Recurse)):
                raise AssertionError(u'Found Backtrack / Traverse / Recurse '
                                     u'after OutputSource block: '
                                     u'{}'.format(ir_blocks))