I carried the bag on IB and also on LH to FRA, stopped over for a night then checked it FRA to SFO.
MY brother who will be coming back in a couple of weeks, will carry the bag on the IB flight, then check it at MAD back to SFO, if they let him. He is UA gold. Otherwise will have to carry to FRA then check it to SFO.