Add better error handling in local to global text number mapping.