Fixes bug #2152 by preventing over-expansion of bboxes beyond the world range.