Fix bug with integer-like keys

Previously if `parseInt()` successfully parsed an integer value from a path, it was used, even if it didn't actually match the path. For example, with a path of `"123abc"` the integer value `123` was used.