The function getDerivation() can return false if its argument is a derivation. This happens if evaluating the name or system attribute triggers an assertion. In that case, we shouldn't recurse into the attributes of the derivation.
FGUL3HAZDA6JGTAZNCJZIIKALZ4VMVTXYWFNSXWDYR5LXNGCO3RAC
foreach (Bindings::iterator, i, *v.attrs)
findJobs(state, doc, argsUsed, argsLeft, *i->value,
(attrPath.empty() ? "" : attrPath + ".") + (string) i->name);
if (!state.isDerivation(v)) {
foreach (Bindings::iterator, i, *v.attrs)
findJobs(state, doc, argsUsed, argsLeft, *i->value,
(attrPath.empty() ? "" : attrPath + ".") + (string) i->name);
}