Fix issue with autocompletion after scope statements