Amend some bugs, and work around another.  THis test is not completely right, but it's better than it was and not yet easy to fix completely. XXXed out troublespots.