app.nlp: Accounting for inheritance when computing prerequisites