Work around probable race condition and optimize cache access