fixed a race condition introduced after switching to the atomic builtins to handle the table size

was found using the google thread sanitizer (very useful!)