It's not really cheating though is it. He went off at 40 minutes and it was put down as a tactical sub, therefore Bristol are well in their right to bring him back on. Even if they change their mind about whether or not he's injured they technically haven't broken any laws.
Ref wanted Afoa back on, Afoa came back on. Lam wanted to protect his player and buy time, he did that.