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