Note: errors will not be set. I don't think they were ever really used.
The purpose of this is to remove the const_cast in the old EDM, which was used to implement the lazy initialization.
Tagging @christos, @rnaranjo.