Fixed bug that caused multiple statecharts to be created for the same context