Restore bug fix, make previously added test pass.

4 jobs for 317792-non-regression-test in 9 minutes and 41 seconds (queued for 2 seconds)