Downhole chemical treatments and fluid compatibility