More robust elementallyBalancedQ.