was run on GTK2 (GNU/Linux). In retrospect, the bug is obvious,
by maintaining a const reference to the wxPen that lbitblock() saves
and restores, the internal reference count is not incremented and
the wxPen is destroyed when it's replaced with a transparent pen,
leaving the saved reference to refer to an invalid pen.
Putting the saved pen into a new wxPen object fixes the problem.
I don't know why this problem doesn't affect MSW builds.