This fixes issue #67. It incorporates @amair's original fix, plus the improvement suggested by @tienle, with tests. Iterations now contain the correct stories!