[relate] fix GCC compile errors - hiding of template parameters and unknown identifier in not used part of the code