You were correct, a fragment/anchor/bookmark in the URL should never be sent to the server, it is purely an instruction to the browser on how to display the page.
The ICS unit did attempt to remove # during relocation, but relocation has many different paths in the code, and it was not always being done.
I've corrected in my master, won't be in SVN for a day or two, but in the latest SVN version add these lines to the function EncodePathOnly:
I := Pos('#', OldPath);
if I > 1 then
Result := Copy (OldPath, 1, I - 1);
My issue with the SSL/TLS certificate was me using an old sample application.
Angus