fix a small bug with multipass compiles, add test coverage for multipass compiles, patch