Restoring window z-order

Hi all!

I've noticed that the "restore window layout" action only restores size and position, not z-order.

Is there anyway to restore, or otherwise control, z-order of windows?

Thanks!