next_occurrences should respect the end_time

Not sure if this is intended behavior or a bug, but it seemed like a bug, so here's a patch ;)