Persons or the members of their family referred to in Article 15, who are staying in or transferring their place of residence to the territory of the competent State shall receive benefits in the territory of the competent State, in accordance with the provisions of the legislation of that State, even if they have already received benefits for the same case of sickness or maternity before their temporary stay, respectively their transfer of residence; if the legislation applied by the competent institution provides for a maximum period for the provision of benefits, the period in which such benefits have been provided immediately before the transfer of residence will be taken into account.