SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD

Hi,
I am getting this bug check
0xD4(SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD) while
uninstalling the driver

This never occurred until recent changes where I fixed IRQL issues caught
by driver verifier. The changes are as below.

  1. Handling post create operation at passive level by creating workitem
    when IRQL>=DISPATCH_LEVEL
  2. Changing the reader write locks from SpinLock to ResourceLite lock since
    prefix table APIs were use while lock is acquired.
  3. Disabling APCs while using resource locks`

Any clue how I can debug this issue.