Merge "Fix memory leak when filtering commands in insertCommand_l()"