fixed order of replacement variables in join conditions