Fix Bug 10865

See https://bugzilla.mozilla.org/show_bug.cgi?id=1086584 for details