NXP-15911 fix contention in SQL directory closing