Spun off from #665.
Spun off from #665.