Correctly reject cases like `concat_map` and non-deterministic functions.