Fixed iteration over subscriptions after removal of subscriber inside handler callback

There was an issue with iterating over subscriptions to call them inside publish method in case when event handler removes subscriptions.