Store locations are unpredictable when editing the mission.sqm file

Can anyone illuminate the code that selects a suitable building for the Gun, Vehicle and General Stores?

I am trying to port the A3Wasteland Stratis mission to the Chernarus map but even though I've picked out enterable buildings for the stores and placed the markers, the stores mostly end up clustered in the very right-bottom corner of the map. 

Other stores end up hundreds of metres from where I placed them with the store owners swimming in mid air.  It's all very Alice in Wonderland.

Are there some good practices for positioning stores, of which I am unaware?