optimise CheckForbiddenElement._find_bad_dependencies()
[//]: #894 (closed) this does what the description said it will do, return if a bad dependency is found immediately, and not later
[//]: #894 (closed) this does what the description said it will do, return if a bad dependency is found immediately, and not later