Moved mutex access from transaction to core.  Core public functions lock mutex.