Restore check for null m_ibus for benefit of TeamCity

This must be what is causing the test failures on TeamCity even though
there's no way I can see for it to happen.
(cherry picked from commit 1a678717b4e51d824fd8c9c8490a1ece9fb33a2d)
Remove leftover debugging output that is no longer needed
(cherry picked from commit 69b06542d9fbf704fe1061e33989a2d6f4594f39)
Merge pull request #25 from marksvc/fixtests

Merge additional commits necessary to fix test failures on TC: Fixtests