EllipsoidFactor: fix bug in calculation of ellipsoid matrix H