Index: src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java	(revision 499764)
+++ src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java	(working copy)
@@ -491,6 +491,17 @@
                     log.debug("Could not find a set of breaking points " + threshold);
                     return 0;
                 }
+                // lastDeactivated was a "good" break, while lastTooShort and lastTooLong 
+                // were "bad" breaks since the beginning;
+                // if it is not the node we just restarted from, lastDeactivated can 
+                // replace either lastTooShort or lastTooLong
+                if (lastDeactivated != null && lastDeactivated != lastForced) {
+                    if (lastDeactivated.adjustRatio > 0) {
+                        lastTooShort = lastDeactivated;
+                    } else {
+                        lastTooLong = lastDeactivated;
+                    }
+                }
                 if (lastTooShort == null || lastForced.position == lastTooShort.position) {
                     if (isPartOverflowRecoveryActivated()) {
                         if (this.lastRecovered == null) {
Index: test/layoutengine/standard-testcases/block-container_content_size_percentage.xml
===================================================================
--- test/layoutengine/standard-testcases/block-container_content_size_percentage.xml	(revision 499764)
+++ test/layoutengine/standard-testcases/block-container_content_size_percentage.xml	(working copy)
@@ -61,9 +61,9 @@
     <!-- from the spec: If that dimension is not specified explicitly (i.e., it depends on 
          content's blockprogression-dimension), the value is interpreted as "auto". -->
     <!-- The 10% are ignored in this case. -->
-    <eval expected="28800" xpath="//flow/block[2]/@bpd"/> <!-- 2 lines -->
+    <eval expected="43200" xpath="//flow/block[2]/@bpd"/> <!-- 3 lines -->
     <eval expected="100000" xpath="//flow/block[2]/@ipd"/>
-    <eval expected="28800" xpath="//flow/block[2]/block[1]/block[1]/@bpd"/>
+    <eval expected="43200" xpath="//flow/block[2]/block[1]/block[1]/@bpd"/>
     <eval expected="50000" xpath="//flow/block[2]/block[1]/block[1]/@ipd"/>
 
     <!-- absolute -->
@@ -76,9 +76,11 @@
     <!-- from the spec: If that dimension is not specified explicitly (i.e., it depends on 
          content's blockprogression-dimension), the value is interpreted as "auto". -->
     <!-- The 10% are ignored in this case. -->
-    <eval expected="43200" xpath="//flow/block[4]/@bpd"/> <!-- 3 lines -->
+    <eval expected="57600" xpath="//flow/block[4]/@bpd"/> <!-- 4 lines -->
     <eval expected="100000" xpath="//flow/block[4]/@ipd"/>
-    <eval expected="43200" xpath="//flow/block[4]/block[1]/block[1]/@bpd"/>
+    <eval expected="28800" xpath="//flow/block[4]/block[1]/block[1]/@bpd"/> <!-- the first 2 lines ... -->
     <eval expected="50000" xpath="//flow/block[4]/block[1]/block[1]/@ipd"/>
+    <eval expected="28800" xpath="//flow/block[4]/block[1]/block[2]/@bpd"/> <!-- ... and the other 2 lines -->
+    <eval expected="50000" xpath="//flow/block[4]/block[1]/block[2]/@ipd"/>
   </checks>
 </testcase>
