A few years back, when MA was still flying and my sister hasn't moved to HEL yet, she was coming to visit me and we put my FF# to her booking. The flight was marketed by AY, but operated by MA. Not only I got the points after her flights, but the BUD-HEL leg was credited as a J flight
So at least ~7-8 years ago, the system was not sophisticated enough to check if the ff# really "belonged" to the traveller