The dbhash cache stores an entry for each namespace.
Collection or DB level operations pass in the namespace "[DB_NAME].$cmd". So only the entry for [DB_NAME].$cmd is invalidated when one of these operations is called.
When we run dbhash on a collection that has been dropped and recreated (e.g. [DB_NAME].abcd), the old and incorrect value of the dbhash is used.