fix some LOCK issues in namecoin.cpp