The problem is a bug, but it seems to only happen if you do an rlock() on the same table in two seperate work areas. If it doesn't create problems, unlock the first work area before unlocking the second. So in your example, instead of just using unlock, do
UNLOCK IN teste
UNLOCK IN teste_again
David Martin