Fix "Only variables should be passed by reference"-notice. Fixes #2209.