html: modify the heading tests to preserve first heading when same as title