Fix for bug 836593 on gecko-21. CLOSED TREE