Throw exception if deleting a place that is referenced in a functional
expression

* Add tests