Test for keyOrder attribute before accessing