Get recursive reference functionality working