Implements the stopAfterFirstError flag in ProceduralEngine