Say I have two integrable codistributions $$ U = \langle du^1, \ldots, du^m \rangle, \qquad Z = \langle dz^1, \ldots, dz^N \rangle $$ on a manifold $M$, with $N >> m$. Suppose that the intersection $U \cap Z$ is nontrivial of rank $m'$ (with $0 < m' < m$) and completely nonintegrable, (i.e., $(U\cap Z)^{(\infty)} = \langle 0 \rangle$), and that it has a basis of the form $$ U \cap Z = \langle B^\beta_a(z)\, du^a \mid 1 \leq \beta \leq m' \rangle, $$ where the notation $B^\beta_a(z)$ means that $dB^\beta_a \in Z$, and $a$ is summed from $1$ to $m$.
Dually, we can write $(U \cap Z)^\perp$ as $$ (U \cap Z)^\perp = U^\perp \oplus \langle D_{m'+1}, \ldots, D_m \rangle, $$ where $$ D_\alpha = A^a_\alpha(z) \frac{\partial}{\partial u^a}, $$ with $$ \sum_{a=1}^m B^\beta_a A^a_{\alpha} = 0, \qquad 1 \leq \beta \leq m', \ m'+1 \leq \alpha \leq m. $$
Here's the question: Suppose I have a function $f(u)$ (i.e., $df \in U$) with the property that for all $m' + 1 \leq \alpha_1, \alpha_2 \leq m$, we have $$ D_{\alpha_1} D_{\alpha_2} f = 0. $$ Does the complete non-integrability of $U \cap Z$ allow me to conclude somehow that $$ \frac{\partial^2 f}{\partial u^a \partial u^b} = 0 $$ for all $1 \leq a,b \leq m$? If so, how? I feel like this should be true, but I've been beating my head on this for several days and can't quite make it work. And if not, is there an easy counterexample?