[duim,tests] Fix reference to undefined function

Replace rest with tail.

This was causing the compiler to crash.