fix #571 "this.__delegateMapping is null" when unloading a page

The exception "this.__delegateMapping is null" could happen in some
cases when unloading a page. This commit fixes this small issue.