[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.
Merge pull request #27 from Flowpack/fix-indexing-again

[BUGFIX] Fix indexing during publishing