def insert_bits(source, insert, positions):
    """Distribute bits from the inserted value into the source.
    
    This function will insert each bit sequentially, meaning that as
    bits are inserted, they will offset the position of later bits.
    The result will affect the position of all existing and added bits
    on each iteration.
    
    Args:
        source (int): Data in integer form to have bits spliced in.
        insert (int): Data to put into the source.
        positions (list): Ordered integers for splicing data into the
            source. Each number is iterated through in order.
        
    Returns:
        Integer representing the resulting data.
    
    """
    length = source.bit_length()
    for i, position in enumerate(positions):
        length = max(length, position)
        bottom_mask = 2 ** position - 1
        top_mask = 2 ** (length + i + 1) - 1 ^ bottom_mask
        insert_bit = (2 ** i & insert) >> i
        source = (top_mask & source) << 1 | source & bottom_mask
        source |= insert_bit << position
    return source
