Recursive name generation. Fixes #206