Geochemical consequences of in situ crystallization