template: gallery: bugfix for header_links_spacer