Davek, I am very interested to know how a bad relay # 3 was causing your head lights to be ON with the ignition switch OFF.
Relay # 3 is not in the head light circuit.
You did say your head lights were ON with the ignition switch OFF.....Right....???
One explanation for this could be; since the pins melted, inside the relay two pins (hot always and hot in on) probably made a contact with each other.