Is it validator #3 or the final validator (#5) that you can’t pass? (Just asking, because this puzzle is so old that I think only CG staff is able to view the validators.)
I can’t see any issue in the approach you’ve described. If you want, you may send your code to me by private message and I’ll take a look there.