Maternally transmitted parasite defence can be beneficial in the absence of parasites