Bug #2771: Fix oneflow recover after a failed scaling
(cherry picked from commit f5d1b9aac7253fcd0e1e92e9bc3b9df7d7bfb0cf)