Detect branch and extension names from nested constants