"Volume contains an OS X installation which may be damaged" After I formatted my disk (instead of just erasing the volume), I struggled to reinstall Mac OS 10.11 (El Capitan) on my early-2009 Mac Mini (10.11 being the latest supported version.)

I tried physically removing the disk and installed a bootable installer on it, following the Apple guide "How to create a bootable installer for macOS". When I tried to install the OS this way, the OS 10.11 installer started fine, but just before the actual install procedures commenced, it gave the error: "Volume contains an OS X installation which may be damaged".

I subsequently tried installing the OS from a USB drive instead of from the disk itself. Unfortunately, I got the same error.

What would cause this error, and what would be a good way to resolve it?
In the mean time, I proceeded with a work-around: install Snow Leopard (10.6) on the disk, using a DVD and external DVD drive. From there on, I'll upgrade to 10.11. Keeps me busy, and it seems to work (so far). However, I consider this a work-around, not the solution to this question.