Well, you could delete folders.dbx (or whatever it's called) and restart OE. On a good day it'll search for all the .dbx files it can find and show you a flat list of them; you'll have to rearrange the folders how you actually want then nested.
On a bad day that'll lose more stuff for you. So take a backup of the entire message store directory first.