Merge pull request #5800 from jquery/fix-5775

A fix for issue #5775(cherry picked from commit 2151fc163ad1b4d93c1d58f53bcd0460ea3864b5)