Fix sorting in component list.

(cherry picked from commit 58f049c4e284785ef95d0f4c4be76d43f2dc0ef7)