Model derivatives - minor changes and tests

This fixes #1524