"Unfortunately these references are all those thing... But I don't want them... And the only information which seems unique is that they are created/deleted when a butt joint is changed to a mitre"
Seems like something that potentially could be solved by a transaction-transaction rollback and comparing two reference lists. Not very efficient obviously. Similar to what Jeremy was proposing for finding cropbox element in his blog.