Use first heading even if there is a line of code first

See issue #265.