A worm's strange sex change led scientists down a path towards a potential new form of inheritance.