Just a note on the OP: some templates change BAB directly, rather than just by adding HD.

Some that change type, also change BAB, saves and/or skills, which affects existing RHD.

So if a Bugbear got one of these templates, for instance, and it changed type to Outsider, it might* also change the BAB for the 3 RHD to good.

*Note: not all type-changing templates do this; in fact, the vast majority specifically say they don't.