fix a bug of Array detection failure.

I introduced a bug when adapting code the existing wildcard system. Now it is fixed.