Fix #1093: correct error message for last()