Upgrade mismatched begin() warnings to exceptions