Just a thought, but when I replaced my Freelander battery I had to resynchronise the alarm fob first, it may or it may not help, but like I say its just a thought and something I had to do first.
The following text is from a workshop manual:
Upon reconnection of the battery, the tailgate glass mechanism may need to be recalibrated. If the battery was disconnected (or discharged) with the alarm armed, reconnect the battery and disarm the alarm. The tailgate glass will now lower fully (this will happen automatically if the alarm was not armed). Fully raise the tailgate glass to recalibrate the mechanism. If the glass is not fully raised, an error 'beep' will sound. If the alarm handset fails to lock, or unlock the door locks, it may be that the handset require resynchronisation by operating the button at least five times in quick succession, in close proximity to the vehicle.