Fix bug 819912 - Duplicate heading IDs
Merge pull request #2088 from mediocrity/heading_unique_ids

Fix bug 819912 - Duplicate heading IDs