[2834] Optimize some achievement checks