LOCK(cs_main) made the QT wallet to hang under specific conditions when a transaction is an aliasnew. See comments on code.