Fix sort routine inside mt:Entries tag. bugid:111398

For static publishing.