I don't recognize this idiom. What are you doing? Can you do this with something as simple as

var self = this; ?