I'm not at home so can't test any of this, mine were just assumptions
but yeah checking if there's actually a target and so on is a good point
the loop in your first version was just for 2 frames so I doubt that it would've been a better option than simply writing it, I'm pretty sure I've read somewhere in code complete that based on test results compiling a loop will only be superior than writing it out if the loop will loop more than 100 times (or something like that) - but then again, if I had to check my code my loops barely reach that amount
I just thought yours was over the top since on hiding you implemented the loop for jsut 2 elements, but when you've let the frames be shown again you didn't and wrote it out - so yeah, one or the other
but yeah general I think we both went a little to deep into this let the OP decide if that's really what he wants^^