unpack-trees: check if we can perform the operation for submodules