# Buggy code
def append(self, instruction, qargs=None, cargs=None):
    """Append one or more instructions to the end of the circuit, modifying
    the circuit in place. Expands qargs and cargs.

    Args:
        instruction (Instruction or Operation): Instruction instance to append
        qargs (list(argument)): qubits to attach instruction to
        cargs (list(argument)): clbits to attach instruction to

    Returns:
        Instruction: a handle to the instruction that was just added
    """
    # Convert input to instruction
    if not isinstance(instruction, Instruction) and hasattr(
        instruction, "to_instruction"
    ):
        instruction = instruction.to_instruction()

    expanded_qargs = [self.qbit_argument_conversion(qarg) for qarg in qargs or []]
    expanded_cargs = [self.cbit_argument_conversion(carg) for carg in cargs or []]

    instructions = InstructionSet()

    # When broadcasting was handled by decorators (prior to #2282), append
    # received multiple distinct instruction instances, one for each expanded
    # arg. With broadcasting as part of QuantumCircuit.append, the
    # instruction instance is constructed before append is called. However,
    # (at least) ParameterTable expects instruction instances to be unique
    # within a circuit, so make instruction deepcopies for expanded_args[1:].

    first_instruction = True
    for qarg, carg in instruction.broadcast_arguments(expanded_qargs, expanded_cargs):
        if first_instruction:
            instructions.add(self._append(instruction, qarg, carg), qarg, carg)
            first_instruction = False
        else:
            instructions.add(
                self._append(deepcopy(instruction), qarg, carg), qarg, carg
            )

    return instructions


# Traceback (qiskit.exceptions.QiskitError)
import qiskit as qk
p = qk.circuit.Parameter('p')
qc = qk.QuantumCircuit(2)
rz = qk.extensions.standard.RZGate(p)
qc.append(rz, [0], [])
qc.append(rz, [1], [])
print(qc)
┌───────┐
q_0: |0>┤ Rz(p) ├
├───────┤
q_1: |0>┤ Rz(p) ├
└───────┘
qc.bind_parameters({p: 3})
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/kevin.krsulichibm.com/q/qiskit-terra/qiskit/circuit/quantumcircuit.py", line 875, in bind_parameters
new_circuit._bind_parameter(parameter, value)
File "/Users/kevin.krsulichibm.com/q/qiskit-terra/qiskit/circuit/quantumcircuit.py", line 897, in _bind_parameter
instr.params[param_index] = instr.params[param_index].bind({parameter: value})
File "/Users/kevin.krsulichibm.com/q/qiskit-terra/qiskit/circuit/parameterexpression.py", line 68, in bind
self._raise_if_passed_unknown_parameters(parameter_values.keys())
File "/Users/kevin.krsulichibm.com/q/qiskit-terra/qiskit/circuit/parameterexpression.py", line 136, in _raise_if_passed_unknown_parameters
[str(p) for p in unknown_parameters]))
qiskit.exceptions.QiskitError: "Cannot bind Parameters (['p']) not present in expression."

# Fixed code
def append(self, instruction, qargs=None, cargs=None):
    """Append one or more instructions to the end of the circuit, modifying
    the circuit in place. Expands qargs and cargs.

    Args:
        instruction (Instruction or Operation): Instruction instance to append
        qargs (list(argument)): qubits to attach instruction to
        cargs (list(argument)): clbits to attach instruction to

    Returns:
        Instruction: a handle to the instruction that was just added
    """
    # Convert input to instruction
    if not isinstance(instruction, Instruction) and hasattr(
        instruction, "to_instruction"
    ):
        instruction = instruction.to_instruction()

    expanded_qargs = [self.qbit_argument_conversion(qarg) for qarg in qargs or []]
    expanded_cargs = [self.cbit_argument_conversion(carg) for carg in cargs or []]

    instructions = InstructionSet()
    for qarg, carg in instruction.broadcast_arguments(expanded_qargs, expanded_cargs):
        instructions.add(self._append(instruction, qarg, carg), qarg, carg)
    return instructions