merge: make function try_merge_command non static