Fix concurrency issues with the file ref database and JE staging area