One thing I found funny, was after searching for something specific and relative to what my car was doing like "Car wont lock with keyless after driving". I Google "Intermittent keyless" and get a forum thread about G3 Libertys.
Yes! This is exactly what happens to me Though it will be fine for a month and then do it for a week or two..
I think it must be to do with something like a relay so your not able to lock until its turned off, as if maybe it still thinks your key is in the ignition?
I suspected it has to do with something internal in the car (damn ) seeing 14v from the car running, somehow upsetting the suspect part.
Mine's been doing this in the last couple of weeks too, seemed to only happen after driving somewhere. Unlocked fine, upon arriving it wouldn't lock properly.