Chest inventory opens anywhere not just at chest.

Ok, scratch that idea.

I think your problem is here

Put a print string here to check the look at ref is getting cleared when you think it should be