Fixed regex computation for mounted routes that have an empty prefix.