Fixed validation of array_pos()