Add a test to reproduce an infinite loop with a single element
@fchasen @julientaq Here's a simple test case to reproduce an infinite loop using a single element (that does not fit on a page).
Hopefully we will be able to come up with a generic implementation to avoid this kind of infinite loop.