Bug #21072 Duplicate key error in NDB references wrong key: Re-wrote string usage to avoid valgrind warnings