Thank you for the follow up and extra information.
Please try to completely remove the check and instead call instance = reference without the if check.
I’ve run some tests and it does not really affect anything up to now, but please do make a backup in case you decide make that change.