stdenv relies on this. So ignore self-references (but only in legacy non-structured attributes mode).
Also updates tests to check for new information. Fixes #799
For the "stdenv accidentally referring to bootstrap-tools", it seems easier to specify the path that we don't want to depend on, e.g. disallowedRequisites = [ bootstrapTools ];