Bug 1026014 - Port Bug 1021969 r=Neil