In the code, the isoparametric curves builder object is created then the faces are processed in a for loop. Inside the for loop, the builder is committed and destroyed. The second time through the loop, there is no builder object to work with and an error is raised.
I'm guessing that either the code will need to create the builder, iterate the faces, then commit and destroy the builder OR create a builder, apply it and destroy it for each face. I suggest recording a journal while creating isoparametric curves for multiple faces to see what the required code looks like.