Fix issue 10991 - implement __traits(getVirtualIndex)

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