Good catch.  Current code paths wouldn't allow it, but the interface contract does, so I decided it best to address.  Fixed in bdae180a96c5dd2b7f27eb6fcabcd3c0cf6c7c99.

A nicer way would be to have the optimizer interfaces work on `IMetric` instances. It would be some work, so I decided to make it a todo for later.