cpp: fixing LuaOutputProtocol map handling