This cast would not be necessary if `pathSplitter` didn't force const on its output, either through `inout` or amending the template.

(And `a` is another bad parameter name)