I did some simple measurements with and without this patch. I ran `(file-name-all-completions "x" "src")' on the Emacs src directory. The timing values were almost identical (varying between 0.001012 and 0.001080).
The way I see it, the patch doesn't do any harm in any coding system, and it is fast. Hence, I don't really see that it's worth the effort to make this code conditional.
However, please write a patch for this if you still thinks it's necessary. I can test it here to make sure it works under OS X.