Bug 872364 - Fix destructive warning code to work better with automation