Someone on this stack had written the following as an answer to a question back in 2011. I have been trying to research this very subject. Where in the code does it state that an Electrician can be held liable for previous work violations?
Let's say your house is really old,and has some knob & tube wiring. Perfectly safe behind sealed interior walls UNTIL you try to load that circuit beyond 10 amps; then the knobs (which insulate joins and corners of wire runs) heat up, arc, and start fires. Now, the standard is insulated multi-conductor cable, with all wire joins located in fire-rated, accessible junction boxes. It is illegal, ANYWHERE, to simply wire-nut some modern 3-conductor insulated wire to the end of a knob & tube conduit and start using that; the entire run, all the way back to the panel, must be ripped out and replaced with modern 2- or 3-conductor wire in the proper gauge for the required load. Usually, when an electrician catches any hint of knob & tube in a house, he will insist that the entire house's wiring be brought up to code even if he isn't touching any knob & tube himself, because if he knows about it, doesn't do anything about it, and the house burns down, he can be held liable, lose his license and even go to jail even if it wasn't his work that failed.