Here we have two condition blocks. The first one to handle system.stat item keys with a single argument only (exclusively "ent" right now). The second condition block is to handle all related item keys having two arguments.
The problem is, that even if everything went well for the single argument item key in the first condition block, the second block is still run through. Since "ent" does not exist as valid first argument here, we end up in the else clause returning an error:
PS: The issue is likely existent in other releases as well.