BZ-1077834: raising the legacy consequence exception instead of the new one
(cherry picked from commit dedf8ea4736bee5b65028a8b4abe7a8595bea734)