Revert "Fix NullPointerException if you somehow store a task without a stage"

This reverts commit e22a31b25900a0e715ee83ef4ff31ca8bb683a5f.