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

http://d.puremagic.com/issues/show_bug.cgi?id=11361

This pull would very likely result in merge conflicts with the one for fixing 11360 if merged sequentially.