Check for flex

Bail out if we need it but can't find it.
Part of #774