factor out container checking to a separate method
only consider the container when dealing with files that don't have
any stream details (can happen for files that have just been scanned
into the library)