What about breaking this method up into smaller, well-named methods?

Right now, I have to parse what you're doing at a fairly low level. I think extracting a few methods would do a lot for readability.