I have a view that takes in the node id as an argument. The view displays a static map. The map is displayed, however the map point points to the wrong location. Upon investigating the database, I noticed in the table location_instance, it got the "lid" mixed up. Also, it is missing a row for one of my content. (That content, when viewed, points nowhere since it doesn't link to a lid with the longitude and latitude). This is the query generated from the view:

SELECT node.nid AS nid,
   node_data_field_location.vid AS node_data_field_location_vid,
   node_data_field_location.country AS node_data_field_location_country,
   node_data_field_location.adminarea AS node_data_field_location_adminarea,
   node_data_field_location.subadminarea AS node_data_field_location_subadminarea,
   node_data_field_location.locality AS node_data_field_location_locality,
   node_data_field_location.deplocality AS node_data_field_location_deplocality,
   node_data_field_location.postalcode AS node_data_field_location_postalcode,
   node_data_field_location.thoroughfare AS node_data_field_location_thoroughfare,
   node_data_field_location.privacy AS node_data_field_location_privacy,
   node_data_field_location.search AS node_data_field_location_search,
   node.vid AS node_vid,
   node.uid AS node_uid,
   node.type AS node_type,
   location.latitude AS location_latitude,
   location.longitude AS location_longitude
 FROM node node 
 LEFT JOIN gmaps_content_address node_data_field_location ON node.vid = node_data_field_location.vid AND (node_data_field_location.field_name = 'field_location' AND node_data_field_location.delta = 0)
 LEFT JOIN location_instance location_instance ON node.vid = location_instance.vid
 LEFT JOIN location location ON location_instance.lid = location.lid
 WHERE (node.status <> 0) AND (node.type in ('coupon')) AND (node.nid = 2)