Backported v1.7 into v1.6 for Inflector class