build: silence false errors during make clean

Fixes #4548.