Dear Michael,
Thank you for your query, and thanks to Scott for the important and helpful explanation.
I am glad to hear that you are aware of the possibility suggested by Scott and that it works.
Sorry that that does not quite satisfy your needs yet due to performance reasons.
If you would like to isolate your solution into a completely generic minimal reproducible case and share the code with us, I will happily take a look and see whether any obvious optimisations or other performance enhancements spring to eye – er, mind:
http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b
I hope this helps.
Best regards,
Jeremy