> You have some confusing stuff in org.el -- you have a
> (declare-function org-element-cache-reset "org-element" (&optional all))
> to suppress warnings in org.el about that function, but
> org-element-cache-reset should be in org-loaddefs, which org.el loads
> already, so it should be unnecessary.
The declare statement is there for a single reason---to pacify native-comp warnings.
If it isn't unnecessary, then something else is going wrong somewhere,
I'd have thought? But I haven't tried debugging further.
I removed the declare statement. The bug persists. Also, org-element-cache-reset is present in org-loaddefs.el
Best,
Ihor