Correcting conditions for cloning (insertion step). Adding an insertMask to handle cases where we can't clone