Applied patch from #9229 to allow common subgraphs of size 1; fixes #9229