Fix numerify() for large number of replacements

Refs #349