Exception callback code optimizations

The old code was doing a lot of stuff which is not necessary when the
processes exception won't be reported.

Related to rhbz#1051198