[geometry] Fixed ticket 9047 (recursive inclusion) and unit test for ticket 8652