Unable to add folders to Dock
I restored ~/Library/Preferences/com.apple.dock.plist and ~/Library/Preferences/com.apple.dock.extra.plist from Time Machine and killalled Dock and now it works. I suspect the first file is the only relevant one since it contains an entry for the directory.