Backout d9c1a10729d9 and 86285ce4c3dc (bug 883498)