Made parametrised state constraints work.