rebases for bugs 783499 and 808370, and orange fixes