Fix execution of self-loops