Added an undefined guard for sorting field.
Authored by: cosbor11 2012-04-30
Parent: [r6175]
Child: [r6177]