Fix bug in UF introduced in Coverity fix.

This makes unit tests for UF pass again.