lib: Prevent raising refresh events when already refreshing