Functions of class $C^1$ subject to a Legendre condition in an enhanced density set