It's not elegant, but I've at least found a hack to fix it.
In globals.gd I added:
var modstatdict = {sstr = 'str_mod', sagi = 'agi_mod', smaf = 'maf_mod', send = 'end_mod', cour = 'cour_racial', conf = 'conf_racial', wit = 'wit_racial', charm = 'charm_racial'}
Then, in slave_tab.gd, I modified the first line of both func mentalup(mental) and func mentalup5(mental), to read:
person[mental] += 1 - person.stats[globals.modstatdict[mental]]
and
person[mental] += 5 - person.stats[globals.modstatdict[mental]]
This is basically subtracting the racial bonus when improving the mental stats, so not exactly ideal, but I couldn't find where it was being added so this is the best solution I could come up with. It shouldn't effect anything elsewhere either, since it's contained within the function.