A key technique for proving unsolvability in classical planning are dead-end detectors ∆: effectively testable criteria sufficient for unsolvability, pruning (some) unsolvable states during search. Related to this, a recent proposal is the identification of traps prior to search, compact representations of non-goal state sets T that cannot be escaped. Here, we create new synergy across these ideas. We define a generalized concept of traps, relative to a given dead-end detector ∆, where T can be escaped, but only into dead-end states detected by ∆. We show how to learn compact representations of such T during search, extending the reach of ∆. Our experiments show that this can be quite beneficial. It improves coverage for many unsolvable benchmark planning domains and dead-end detectors ∆, in particular on resource-constrained domains where it outperforms the state of the art.