script timeout should get reset even when async callback is called synchronously

Fixes Issue #6947