Fix issue 10991 - Implement __traits(getVirtualIndex).

Minor tweaks to __traits(getVirtualIndex).
Add unit test for __traits(getVirtualIndex).

Added additional test for final overrides.

Fixed formatting for virtual index test.
Formatting: moved else block to separate line.
Another incorrect brace fix.
Merge pull request #2536 from Kapps/fix10991

Fix issue 10991 - implement __traits(getVirtualIndex)