The problem are in these lines (and the recursion of all the children).
with Control do
begin
Left := ScaleX(Left, FromDPI);
Top := ScaleY(Top, FromDPI);
Width := ScaleX(Width, FromDPI);
Height := ScaleY(Height, FromDPI);
end;
Somehow, one of the children might be mistakenly be tagged as TWinControl and might get property Left/Top overwritten which could cause the crash.
Commenting these out will erase the error.
The problem is somewhere around there.
It's late here so I'm going to call it a day.
If it's nog solved tomorrow I will have a closer look.
Edit: It's not even in the recursion.
Commenting out the // ScaleDPI( inside the ScaleDPI, the error still occurs.
So it's the assigning of Left/Top etc to the Form itself.
Putting an exit; right after the with Control etc. confirms that.
Putting an exit before the with Control, the error stays away.