I think you should compute needBaseObjectIds right before this method call.  Prior to resolveDeltas baseById can contain objects which are also in this pack file, and thus aren't in the assumed base and shouldn't be reported in that baseIds collection.  After resolveDeltas, baseById contains only the objects which aren't in this pack, and must come from the local repository.  That's the set you want.