User blog comment:DaNASCAT/Technical Update: November 26, 2013/@comment-188432-20131127222615/@comment-957747-20131127223830

While I agree that articles should refrain from using H1 and that it's bad practice to use them generally (as well as being against traditional MoS), vanilla MediaWiki treats H1's as valid TOC structure and shows them as they should in the correct hierarchy. For that alone, it was considered a bug and fixed.

You can see Wikipedia's generation of the TOC in this type of example here.