Add regression test against crash spotted in bug #853589

Link to bug: https://bugzilla.mozilla.org/show_bug.cgi?id=853589