Fix some wxWidgets 2.9 DEBUG asserts.