Some extra locking for miniexp ddjvuapi functions (still not enough)