Comment 6 for bug 683996

Seems like these changes have already been added upstream, in commit acc4541ab31196fa2b6bbc60997c6b0d7e93392e.