Potential fix for #2335.
auto merge of #2411 : glennw/servo/issue-2335, r=pcwalton