Causality and non-equilibrium second-order phase transitions in inhomogeneous systems