Merge bug 835742 to v1-train
(cherry picked from commit 9a0fb347f71dee1f1178944c1f78a3838c3fff42)