Bugfix: don't crash when attempting to publish new invalid doc

Not sure what the thinking was behind `.tap`, it will always execute the
block.

Added a cucumber scenario for this as well, although that might be
better covered by a lower level test.