reordering region middleware (bug 865132)