Assuming you are trying to add content only to the first post in the loop, a static variable should do it:
function pietergoosen_insert_content_filter( $content ) {
static $first;
$first = (!isset($first)) ? true : false;
if (true == $first) {
ob_start();
$sidebar = dynamic_sidebar('sidebar-19');
$new_content = ob_get_clean();
if ( ! is_admin() ) {
return pietergoosen_insert_content( $new_content, 2, $content );
}
}
return $content;
}
add_filter('the_content','pietergoosen_insert_content_filter');