Make sure this.sortedVersions is not null when sorting.