[BUG #8533] prevent infinite loop