Moving rem between documents leaves behind an invisible portal

as of late I’m experiencing a bug where sometimes when I move a rem into another document (either by /move, dragging or omnibar), it adds a portal reference to the rem saying they’re in a portal in the origin doc. I go to the origin doc to delete the portal (since I never want to leave portals behind when moving rems), and there’s no portal there! but the rem I’ve moved continues to state that it’s ‘In 1 Document’ (the origin doc).
this adds a ghost reference to the count and it’s pretty annoying since I use the references panel a lot because my database is heavily linked. any way to fix it?