fix Issue 11691 - can't join pathSplitter with pathSeparator

- The inferred return type of front had an additional
  layer of const because it's a const method.