Caste ratio adjustments in response to perceived and realised competition in parasites with division of labour