Ensure auto-reset operations do so even when an exception is thrown.