Deal with shared data structures more safely.