Factor out the code to scan an instruction's operands into a