I bet it's that there are no pullup resistors on the SCL and SDA lines when using I2C command. The SHIFTOUT and SHIFTIN command use the pins in a sink and source mode but the I2C mode reverses the the data pin direction at the end of the byte sequence looking for the ACK bit from the slave device. There must be a pullup on the data line to provide sourcing current back to the PIC. If the PIC does not see the proper ACK signal then the command sequence is aborted.