For advanced JS coders reading this in the future, here's the order of events firing:
1. Extension code executes. Any code that sets fields on the 'b' variable will work fine. You can have this line in a JS Code extension as long as it is NOT inside a function.
b.version_s_code="20131125";
2. Mappings are run. If you have a mapping from version_s_code to prop24 and eVar24 then they will be set correctly on the SiteCat tag.
3. The SiteCatalyst tag executes, and it calls doPlugins(). That means that when the doPlugins code executes, it's too late to use Tealium mappings to set data fields.
Here is a code example to summarise this:
////////// JS Code extension ///////
// Will be picked up by mappings
b.version_s_code="20131125";
function s_doPlugins() {
// b is not defined here but you can use props and eVars directly
s.prop24=s.eVar24="20131125";
}
s.doPlugins = s_doPlugins;
////////// End of extension ////////
As Dan rightly says, best practice is to keep these two pieces of code in separate extensions, because of the risk of confusion with different scopes.