Fixed evaluation of $COMP_CWORDS and issue #3246