Modifying ToC-expanding script to avoid collapsing except when expanding a different area.