Fix bug #3574: Template addressing