Fix for dimensions field array_in_array function

FIX: When more than one dimensions field is used, the array_in_array function will try to redeclare itself.