Don't remove TABs that are inside the command

only remove those that are at the beginning, end and separator


(Closes #2315) due to #522 (i think)