fixes #17251, resolves dojox/dtl bug with looping over key/value pairs