Fixed SymbolDatabase if unnamed struct is casted and returned (#6125)