Bills can be passed to a different Congress if and only if they're being passed from the Congress who proposed the bill to the Congress following them. For example, a bill could be passed the 56th Congress only if it was proposed by either the 55th or 56th Congress.
This is simply a codification of precedent.