Fix detection of unknown root dependencies and the resulting error message. Fixes #418.