Pull in refactoring to allow get_numeric_data() to be optimised.