When getproperty is overridden by the user, field errors point to the wrong location. Here's a minimal example:
struct Test
x::Int
end
function Base.getproperty(o::Test, s::Symbol)
if s === :y
return getfield(o, :x)
else
return getfield(o, s) # FieldError for `z` points to this line
end
end
function test(x::Test)
x.z # I'd expect the field error to point here
end