Although i am not completely sure, what was going on, i have removed a per-thread caching level. My suspicion is that the database handle names are not unique, and since "db_driverkey" is sometimes called with a database name and sometimes with a handle, the latter variant might lead to confusion.