check for looping attr before reading

/cc #1