Improve regression test added in 8525bfc7.

Refs #422.
Invalidate cached list of panels during tests.
Prevent some tests from succeeding by accident.