Thermodynamic vs. topological phase transitions: Cusp in the Kertész line