Orphaned resources. Again

I was looking into my sqlite database with an sqlite GUI browser and noticed something strange.

In note_resources I have quite a few entries that are apparently unused:

37		758d6b7f549b4cbab98f071bc8a72908	0	0

However if I do this (taking the above id as an example): select count(1) from notes where body like "%758d6b7f549b4cbab98f071bc8a72908%"
then it turns out there’s a note that references this resource and it’s an actual live note, not a deleted one.
So this seems to indicate there’s a problem with resource state handling somewhere in the application.

There are 2 things that seem to be in common for these notes/resources (but it’s only for a few that I’ve checked). One is that each of those notes has more than one resource attached, and two is they were imported from Evernote a while ago.