Improve context detection

Don't remove the last "word" when there were no base found. This helps in
situations where you are after a keyword like "extends" and trigger the
plugin.