Properly guarding all selects based on siteid and txid.