I was thinking about how to fix this because i face a similar problem.
i was thinking like a timeout to readd while a onplayerhurt function would remove the attribute setting for the duration than add back afterwords Though im not sure if that could even work. Because i have a smaller project that requires a image to stay up at all times. Hope this gives you a lead onto a fix perhaps. If so give me the method and maybe i can work my own way around my problem :P
But of course im talking about how mine works... Good luck to your problem
