optimized updating flipped_in_connections. closes #267