Avoid sending unnecessary build error notifications

Only send error notifications if the last build wasn't
already an error.