don't pass in a lock that's only used inside this function. Change-Id: I15c01e9cfe343cf13828ae3b3742c36ae697291f
RegisterLegacyCommand