Bugfix: gap fill was not inserted in the correct order before leaving island. Includes regression test. #1907