Bug 1090562 2 dot 1 uplift

Includes fixes for bug 1090562 and bug 1071114. Bug 1071114 being a dependency for bug 1090562.

https://bugzilla.mozilla.org/show_bug.cgi?id=1071114
https://bugzilla.mozilla.org/show_bug.cgi?id=1090562