Restored custom_slug functionality, fixes #2761