Same as getFieldIndex, but checks for a direct match with the VarDeclaration
index of the field, or -1 if not found
Same as getFieldIndex, but checks for a direct match with the VarDeclaration