fix bug 841735 - Prevent self-redirecting

https://bugzilla.mozilla.org/show_bug.cgi?id=841735