Re-rolled this against 9.3.x from #3