two windows for the same subpatch

Try this, saving the patch beforehand with the subpatch open:

[loadbang]
|
[vis 1(
|
[s pd-foo]

[pd foo]

Bug: when you load the patch there are now two windows for that subpatch