Code Before Test
A tip from Volkswagen: If any vehicle control module is replaced for any concern, it is recommended to code that module according to guided fault finding before testing if the repair was successful.
For example, if a door module was replaced to correct a battery drain issue, that module must be coded before a re-test of the system.
It is also recommended to re-code the gateway module when another module is replaced to re-set the communication system. Even if the coding system seems to be correct, entering the code anew will force a re-set of the system.