I would recommend not removing elements of Part while iterating over the header contents...you may be changing the underlying data without the Enumerator knowing (I am not familiar with the API so...