If you handle INDIRECT_REF directly, then you are seemingly changing the
semantics of the predicate. The predicate says that it's expecting an
ARRAY_REF as input.
The way it's documented, the input *must* be an ARRAY_REF. If that's
not what's meant, the comment should be changed. But if the comment is right,
then the behavior is undefined if the input is *not* an ARRAY_REF, so there's
no change to its documented semantics.
Point me to the bug you are trying to fix?
The bug I see is that the code doesn't agree with its comment ...