BUG Fixed handling of numbers in certain locales.
Fixes #2161