Fix scan & join dispose handling

There were some holes in the dispose chain in both `join` and `scan`.  This adds unit tests for the holes, and fixes them.