Having looked in functions_newpost I cannot see any link between the variable you have removed and the functionality you seem to require - $prevpostfound is the duplicate post check. In fact I can't see how it could ever be 'true' at the point of that code, so it seems to be a redundant check you are removing.