Fix bug with page template collisions sharing the same page id