Will the IC mess up if the inputs that don't affect the output are disconnected?
Bad things happen with HCMOS logic if you allow any input pin to float. The power consumption increases by orders of magnitude if the pins are allowed to wally around in the linear region. If the input does not affect the logic function, then it doesn't matter what logic input state it takes. It can be tied high, low, or even to another output, as long as it is a valid logic level, so there are usually plenty of options for helping the layout out.