def wrap_check_start(l, start):
    """Check that start index falls in [-l, l) and wrap negative values to l + start."""
    if (start < -l) or (start >= l):
        raise IndexError('start index out of range')
    if start < 0:
        start = start % l
    return start