For future reference, in case someone ever finds the same problem, the error is caused by the missing import of "$(SDKP4DIR)/components/flowcache/me/lib/flowcache".
To solve it, just manually include this path with the "--include" flag when disabling flow cache and running the nfp4build command.