Systematic study of the role of the indirect RKKY exchange interaction in ultrafast spin dynamics of 4f antiferromagnets