backed out c6691cff88a4 (bug 1044598 pt 3) for lots of leaks on this CLOSED TREE