Remove assertion that used moved allocator. Fixes #10777.
Move the allocators after copying the hash functions.

Just in case the hash functions throw.