fix warning in RemoveBracesAction; add tests to check for invalid cases