Backout 389ff4b5612c and d234394e0147 (bug 987680) for reftest failuires.