fix handling of array argument to makeNodeResolver

With for…in enumeration the indexes are given as strings, and `"0" + 1` gives `"01"` rather than `1`. Switching to a regular for loop is a solution.

The handling of `true` is not broken but also lacks tests. I've included a test case for this, too.