TESB-10277 (Backport changes in SAM server project to 5.2.3)