Not sure if this is an issue but thought I would point it out. Came across this section of code starting at line 6445:
var self = this;
It looks like someone started to create a variable to handle the closure but did not use it. I did a scan looking for self = this, and it appears this is the only place it was not used.