Is there a situation where this will result in an infinite loop?