Fix exception caused by checking for code actions the wrong way.