Fix issue 10991

Fix issue 10991 - Implement __traits(getVirtualIndex)
http://d.puremagic.com/issues/show_bug.cgi?id=10991