Can an attesting witness be a beneficiary of the will?

As per the Indian succession act, if the testator makes any gift to the attesting witness or to the wife or husband of the attesting witness, such gift becomes void but the will is deemed to be valid. But, this clause does not apply to Hindu, Buddhists, Sikhs, Jains etc., so a legatee under the will of a Hindu will not lose his legacy only because he has attested the will.