This post is probably going to open me up to derision from the practical community ("that's close enough, why are you bothering about 7 thou?") and the more academic ("your sums are wrong and your measurements are suspect!") but I'm feeling brave so here's my theory.

I believe that the dip in the surface of my epoxy is due to shrinkage, and there is a lesson to be drawn from that in how you should use epoxy. This evening, I measured, as closely as my measuring kit would allow, the depth of the epoxy bed at the end and the centre of my X rail. If I assume that the difference in level is due to shrinkage, the difference in levels of the hardened epoxy corresponds to a shrinkage amount of approximately 10%. That is, after setting, the epoxy bed will end up about 90% of the depth of the liquid resin. That's using the resin as per the first post of this thread. I suspect that a nominal 10% linear shrinkage will not lead to an exact 10% reduction in depth as there will be other smaller effects due to shrinkage across as well as down through the epoxy but I'm ignoring three-dimensional effects for the moment. I'm happy to go through how I did my calculations if asked, but for the moment I'll skip directly to my conclusions.

An application of this epoxy will lead to a reduction in "depth" errors by an amount dependent on the shrinkage factor of the epoxy used. In my case, for example, I started with a dip in the rail surface of about 1.7mm; after epoxy treatment I ended up with a dip of about 0.18mm, a reduction of about 90%. If you think about it, this will happen whatever the depth of epoxy used (unless there is some other effect associated with shrinkage). However, if I now used a second layer of epoxy on top of the first, then I would reduce this dip by about 90% again, and I would expect to see an dip of about 0.02mm after that. In other words, for a given total depth of epoxy, you would do better to use it in two thin layers than one thick layer.

Does this also explain the effect that some people have seen where there is a noticeable shrinkage effect at rail/bridge joins - if you are not careful to get the bridge at the same height as the rail, then there will be a different amount of absolute shrinkage either side of the join and that might affect the resulting levels?

Jonathan's measured error curves are not quite in agreement with this principle, but his measurement technique is dependent both on rail height variation and rail twist, and once we are getting down to small numbers the measurement technique becomes important. However, it is interesting (but possibly coincidental) that his initial error was reduced from about +-0.3mm to about +-0.03mm. That's the kind of reduction that my thinking would have suggested although it doesn't prove anything due to, as I say, the different measurement technique.

If I had thought about it beforehand, then all this would have been blindingly obvious but then, I would not have expected quite as much shrinkage. Looks like epoxy is great, but it reduces rather than removes build alignment errors and the more accurately you can build the initial structure, the better the result after using epoxy. Shimming, on the other hand, should be able to take out arbitrary errors, although it's going to be much more difficult to measure and remove rail twist.