Reorder task fix

I have created a new branch for the reorder_to_front patch, so you can include if you choose.
I have no strong opinion whether to include it or not.