Do not crash when adding bookmark to main folder, fixes #440