We don't know exactly how different builds are handled, but we get some small hints from game assets. There is a config file with version numbers showing the path of the project file where everything gets compiled/cooked from, and that shows that each different release is a separate branch on their version control system. I'm betting the first two patches (before 2B) were based on the launch version of the game (that way they avoid adding anything related to DLC characters). And then we get the December patch with 2B which must have been based on a completely different branch.
I think that's how the leak happened. When setting up the new branch for releasing the patch with 2B (which was probably based on some "master" branch containing everything they work on), they were careful enough to ensure it didn't contain any assets (as in models, textures, animations, etc) related to other DLC characters, but there were still references to the characters within the game code (either they thought that was obscure enough that no one would find them, or maybe they didn't know there would end up being strings referencing the characters in the compiled code/cooked assets).