rebases for patches in bug 760876 and more test fixes