Use the right buffer to determine the error region

The error region must be determined in the buffer associated with the
error.
Remove out-dated TODO item