As of 3.9.0 getindices() always returns a list. If it's called on a non-existant or undefined variable it returns an empty list.
Currently (as of 3.12.x) getindcies() when called on a list returns an empty list.
I think it would be more useful if getindices() when called on a list, returns the positional index of the elements.
I think it should output: