[BUGFIX] Fix indexing during publishing

The fix in PR #26 for the bug introduced in PR #25 contained another
bug that broke indexing of nodes that had a target workspace associated.