Fixes #4528 instead of failing with an exception, log a warning instead.
Note that I still do not understand how this could be triggered, hopefully if we log we will gather more info about issue.
Merge remote-tracking branch 'origin/master'