Fix shared Bitmap state in tests.