Fix DP unit test

Fixes #1283.