Fix firefox JS bug on viewing revision

Sometimes in Firefox, when pushing link "View Revision" in admin's "Revisions" view, one gets an exception "HierarchyRequestError: Node cannot be inserted at the specified point in the hierarchy". This PR fixes it.