that function has suffered multiple modifications along its history (1 year). Initially it was returning the $oldid if no match was found, but later was decided to return "false" in case of no match found (because bool "false" seems to be the more correct value for that situation).
The only possibility I can imagine is to return "NULL" if the requested id is "NULL" and return "0" if the requested id is "0". They don't collide with the meaning of "false" and won't be matching ever. But, in the other side... it will require to revisit all uses, because there are places where we are relying in returned values to decide execution flow.
Another possibility could be to add one 3rd parameter to the function, able to specify which value we want to use if no match is found, so you will end with something like:
$data->outcomeid = $this->get_mappingid('outcome', $data->outcomeid, NULL);
It has the advantage of being 100x100 BC, so all the old uses will return the same bool "false" (default for param). And you will be able to alter that behavior for each use.
How does that sound? Ciao