Fix Issue 9998 - Use a workaround to make RefCounted pure.