Avoid "exists" on an array element

The core has described this usage as "deprecated and likely to be removed"
for some time, and work is in progress in blead to start emitting a genuine
deprecation warning for such code.

In this case, using "defined" instead of "exists" seems to work fine.