New version in which all of the cruft has been removed. The problem is now completely simplified (I think. I have been known to be wrong in the past...)