submodule: properly recurse for read-tree and checkout