Then it shouldn't be a crime to lie to the officer.
I genuinely don't think certain charges relating to preserving one's freedom should even be a crime in of it self.
Unless you endanger others in an extreme manner, things like "resisting arrest", running from police, or attempting to escape prison shouldn't be charges within themselves.
People love the phrase "you can beat the rap, not the ride", but that essentially gives broad power to harass and damage one's life without recourse sans extremely expensive legal routes. In this example, a man lost his freedom for 37 days over a bogus charge and was paid by the taxpayers to essentially shut up.
I believe in certain Scandinavian or northern European countries, there is no crime or additional punishmented meted out for attempting to or escaping from prison, as "the desire to be free is inherently human". You will be looked for, and retrieved and returned, to be sure, but you won't then be charged with escaping from custody.
It's not. You might be thinking of perjury, which is lying under oath.