Fix skipping dependencies with default values

There are no tests for `_validate_dependencies` so a bug slipped in with the fix for #353 where dependencies with default values were not being skipped properly. This pull request fixes that and adds the missing test coverage.