Leica TCS: fix a few file grouping bugs

Fixes QA #4832/#4833.