[#74774412] Fix compilation on linux

Our classic issue where MSVC allows you to pass an r-value as a
non-const reference parameter.