Federal regs. 2B takes it out of state hands and permits it since are not restoring or replacing the number (which I take to mean restamping all or part of it). You are merely making a necessary repair and transferring the original number to an unserialized part in the same location as originally stamped.
1364. ALTERING OR REMOVING MOTOR VEHICLE IDENTIFICATION NUMBERS
Section 511(a) of Title 18 makes it a felony knowingly to remove, obliterate, tamper with, or alter an identification number for a road motor vehicle or a road motor vehicle part. Section 511(b) of Title 18 creates exceptions for certain persons who engage in lawful conduct that may result in removal or alteration of an identification number. The legislative history is abundantly clear that subsection (b) is not intended to create a loophole for the operators of "chop shops." See H.R.Rep. No. 1087 on H.R. 6257, 98th Congress, 2d Sess. 23-25 (1984).
(1)Subsection (a) of this section does not apply to a removal, obliteration, tampering, or alteration by a person specified in paragraph (2) of this subsection (unless such person knows that the vehicle or part involved is stolen).
(2)The persons referred to in paragraph (1) of this subsection are—
(A)a motor vehicle scrap processor or a motor vehicle demolisher who complies with applicable State law with respect to such vehicle or part;
(B)a person who repairs such vehicle or part, if the removal, obliteration, tampering, or alteration is reasonably necessary for the repair;
(C)a person who restores or replaces an identification number for such vehicle or part in accordance with applicable State law; and