That is bad construction, add a foam layer over the compartments and problem is solved.
As I write this I see that this community is about aincent coins, and I can understand that foam might cause a chemical reaction with different metals, but why this is even an issue when the solution is simple I have no idea