In 7bce70f the use of an approximate covariance (nearest positive-definite) was intended whenever negative eigenvalues were sufficiently small (in either the Hessian or similarly its inverse); however there is a short-circuit test that discards the hessian prior to the approximation method:
In 7bce70f the use of an approximate covariance (nearest positive-definite) was intended whenever negative eigenvalues were sufficiently small (in either the Hessian or similarly its inverse); however there is a short-circuit test that discards the hessian prior to the approximation method:
https://github.com/chjackson/flexsurv/blob/e16d5fd5eb419e876b15d0b35a94cf59d2063cc7/R/flexsurvreg.R#L988
This is a tricky case to test, so I'm not surprised that it wasn't picked up when implemented.