Switched to using the data-parent attribute so you can look up by ID. Should increase performance and cause less issues.