Fix for broken tests.
Sorting virtual methods when adding them.