Fix bug where wrong flag was being checked in header merge (merge rg vs merge pg)
Add @RG PG tag rewriting, this all needs cleaning up and consolidating now.