source_group with TREE <root> does not work as expected when <root> is not CMAKE_CURRENT_SOURCE_DIR
Most probably the problem is in assumption at https://gitlab.kitware.com/cmake/cmake/blob/master/Source/cmSourceGroupCommand.cxx#L97 that the relative path here is rooted at current source directory, whereas it may be rooted elsewhere, since the root could be arbitrary and was cut out at https://gitlab.kitware.com/cmake/cmake/blob/master/Source/cmSourceGroupCommand.cxx#L48 (BTW, without checking whether it is really the prefix of that file path or not).