Expanding URI templates before combining URLs