fix #4366: endless loop (seems to be a chrome problem, opera wasn't affected)