Add warning and early return if we get an unexpected active view.

This happened in the assistant unit test of kdev-clang.