Only replace ~ at the start of a view definition path if it is at the start