I think `var i = self.renderTasks.indexOf(internalRenderTask); if (i < 0) ...`  will look better