Improve error message for malformed dependencies