Fix issue with shared library unloading windows

Minor change to db_raw variable scope