Changed getsections sort to only use those sections that have the sortkey defined.