I would like to share the following in case you encounter the same issue.
Class and Record Helpers (Delphi) - RAD Studio states that:
Actually, this is not entirely correct. Consider the following:
Unit HelperUnit1.pas:
TObjectHelper1 = class helper for TObject
procedure Test;
end;
Unit2 HelperUnit2.pas:
TObjectHelper2 = class helper for TObject
procedure Test;
end;
Unit SupportClasses,pas:
uses
HelperUnit1;
type
TMyClass: class
end;
Unit MainUnit.pas
interface
implementation
uses
SupportClasses, HelperUnit2;
begin
var MyClass:= TMyClass.Create;
MyClass.Test;
end;
MyClass.Test will use the HelperUnit1.TObjectHelper1.Test implementation even if HelperUnit1 is not even in scope, let alone being "in nearest scope".
So it appears that if a class helper is in scope where a class is defined, it is used unconditionally in all units of a project. If not, then what it is stated in the documentation applies.