Add minor optimization to AbstractErrors

Issue: SPR-11304