Fix for #1458: clean-targets sanity checks.