The gap phenomenon for variational integrals in Sobolev spaces