A geometric setting for higher‐order Dirac–Bergmann theory of constraints