loop recognition in order to prevent from an endless loops that in turn may consume all available memory. PR: 220868