Fixing seg fault when attempting to read a non-existant attribute several times

This issue was introduced by 030e7c9. I also re-wrote that original test using parallel_reduce, in order to make task.errors() return a meaningful result, and I verified that the re-written test still exhibited the original issues that 030e7c9 solved.