avoid needless location changes when coordinates are null, #22364