Correctly auto-generate folder URL aliases (see #5697)