I think it's pretty commonly understood that integrity can include not compromising your values in the face of consequences. Often, the value against lying is fairly weak compared to other values. In fact, contemplating lying to authorities to prevent another's (often unjust) punishment is a pretty common topic in explaining different philosophical systems.
It's really just a variation on the trolley problem.