Fix a bug related to selectInst.