             }
 
             k = common_predecessor;
+
+            backstep_counter++;
+
+            if(backstep_counter >= maximum_backstep)
+            {
+                break;
+            }
         }
         else
         {


size_t predict_size_residual(fppoly_t* fp, const size_t layerno)
{
    size_t free_space;
    size_t total_space;



size_t predict_size(fppoly_t* fp, const size_t layerno)
{
    size_t backstep_counter = 0;

    size_t free_space;
    size_t total_space;

