Add assertion upon too many ajaxStop's.

This is should have helped in #3564.