Re-organize panels only if Devtools is indeed docked to the right side.

Does what it says. Details in the commit message.

Idea taken from https://github.com/mauricelam/DockToRight. Hey, I'm new to this; I hope this isn't considered bad etiquette (is it?). If it is, please do tell me.