Using Moodle 2.0 Preview 3 (Build: 20100604)
When switching roles (e.g. from teacher to non-editing teacher OR student) the following error message is displayed, then the role-switching is effective.
There is no error when switching back to "my normal role".
Coding error detected, it must be fixed by a programmer: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course.
This error message has been mentioned in the past, but I had not come across it lately when testing 2.0.