How a failed Japanese space mission lucked into catching a comet