Fixes #5988: Error with only "and" target since #5982
Merge pull request #718 from fanf/bug_5988/error_with_only_and_target_since_5982

Fixes #5988: Error with only "and" target since #5982