Re #5174. Up memory limit tested against and add message to test.

I think this test still has some value in partly checking complete
nonsense isn't going into the variable. So I've increased the RAM
tested against to a value that isn't likely to be encountered
in the foreseeable future and added a failure message so that it's
clear what is being tested against.
Re #6547. Add line termination so the log message will show up.
Re #6547. Check that map has been fully filled.

Just checking that it's not empty can mean that filling it is in
progress, so we need to enter the critical block if that's the case.
This shouldn't have much (any?) performance implication as size(),
like empty(), takes constant time.