Do your math and you will see that you gained .010 didn't loose it. Using a shim will actually make things worse.
You milled .030 and used a .040 gasket. Therefore you increased the distance not decreased. By milling .030 and using a .040 you actually lost ground.
Put it together and forget the shims they will make things worse.