Tweaking slug logic in post settings.

Fixes #2136.