Fixed infinite loop at missing function search

stmt duplication can change a def_stmt into a size_overflow stmt which triggered an infinite search/duplication loop.