Sort UV islands by location instead of size?

Does anyone know if it’s possible to ‘sort UV islands by location instead of size’? Instead of having large chunks to the bottom-left and tiny crumbs to the top-right, it would be great (mainly for leaky lightmaps) to re-organise islands by their actual location on the mesh.

Is there a script or some hidden option somewhere, does anyone know?

I probably shouldn’t need to post screenshots or blend files to explain this.


Actually I just realised that Lightmap unwrap doesn’t sort UV islands by location anyway, which I think is wrong.

I would gladly donate money (/pay) a capable someone to write an addon that can achieve this because I think it’s really important for people trying to export lightmappable interiors to a game engine.