Based on the description, it looks like it's probably caused by the delayed invocation of subscriptions.update. Can you check your code and see if there's another delay() being called before clock.advanceDays(40) ?
subscriptions.update
delay()
clock.advanceDays(40)