It looks like you found a good solution to this. Let me know if you have any unresolved questions.
Another post I wrote may be relevant so I thought I would include a link here. It shows how to get the parent symbol of a given element. Getting the SymbolInstance for an element inside of a symbol