Re #1332 - Fixed the generation of canonical urls