The image has an array of layers. It should be possible to change them there.
temp = image.layer
image.layer = image.layer
image.layer = temp
or something like that. Not tried..... ;-)
Thanks... but I'm done before I read your answer ;-)
Some old scripts, people at gimp-irc and some docs did helped me to achieve it.
What looked like a big problem turned out to be some lines of Python.
The most code that's left over is printing some helping information
that was needed in developing.
When I kick that out, it's less than about 90 lines.
Now I can go on with my picture I wanted to work on...
Now it has 125 lines...