Broken ergodicity, magnetic helicity, and the MHD dynamo