A deep equality function that ignores unexported struct fields.