Fix sort routine with meta data in dynamic publishing. bugid:111404