Help with determining the sheet number an annotation element is on

I have a script that grabs the sheet number a note block is placed on and assigns that number to a Sheet Number param on the note block. This is used in conjunction with a schedule filter to only show note blocks on sheets they are used on. Works great until this new situation we ran into.

We have some split/matchline plans where two dependent views are cropped and placed on two sheets.

The Clockwork node, Element.OwnerView does not detect the dependent view as the owner. Instead, it just sees the parent view, which is not placed on a sheet. So, it just puts “—” as the sheet number.

Any of you gurus see a way to update my script to account for this scenario?
Thanks!