Merge pull request #1667 from Kapps/fix11361

Fix issue 11361 - Variant fails to compile with functions containing const arguments.