Maybe you could have simply override the parent `AutoCompleteController::getDefaultTemplate()` method and test inside.

```
getDefaultTemplate : function () {
    if (this.expandButton) {
        return this._resourcesHandler.getExpandoTemplate();
    }
    return this._resourcesHandler.getDefaultTemplate();
}
```