Properly eta-reduce terms