Fix variables creations when using only locations
Little clean: Use map instead of fold_left