I feel like we generally use `DefId` for "something that may not be in the local crate" and a `NodeId` for "things that are definitely in the local crate".

Looking around in this file though, it looks like that's just how I think of it, so this is fine.