Synchronize fixes from the 3.x branch to keep Bullet code in sync for later, even if it's disabled for now.