Issue title: SC2178 gets confused with `declare -n`
 Issue body: #### For bugs
- Rule Id (if any, e.g. SC1000): SC2178
- My shellcheck version (`shellcheck --version` or "online"): online
- [x] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- [x] I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit

#### For new checks and feature suggestions
- [x] https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- [x] I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related


#### Here's a snippet or screenshot that shows the problem:

```sh
#!/bin/bash

HOSTS=(a b c)
declare -n RESOURCES=HOSTS
RESOURCES_SELECT=()

get_max_width "${RESOURCES[@]}"
RESOURCES+=(d)

if [[ " ${RESOURCES[*]} " == *"$1 "* ]] ; then
	# We filter the resource selection
	RESOURCES_SELECT+=("$1")
fi

if [ "${#RESOURCES_SELECT[@]}" -ne 0 ] ; then
	unset -n RESOURCES
	declare -n RESOURCES=RESOURCES_SELECT
fi

```

#### Here's what shellcheck currently says:

```
Line 16:
        declare -n RESOURCES=RESOURCES_SELECT
                   ^-- SC2178: Variable was used as an array but is now assigned a string.
```

#### Here's what I wanted or expected to see:

Nothing. `declare -n` sets an alias. The underlying variable, on both cases, is an array - so the alias remains an array too
 Comments: 
 Comment 0: Another sample with `-n` and SC2178 false positive 

```shell
#!/bin/bash

h () {
    local -n a="$1"
    a+=(h)
}

g () {
    local -n a="$1"
    a+=(g)
}
```

shellcheck outcome:

```
Line 9:
    local -n a="$1"
             ^-- SC2178: Variable was used as an array but is now assigned a string.
```
{'source': 'GithubIssues', 'repo_name_with_owner': 'koalaman/shellcheck', 'issue_id': 710125453, 'repo_stars': 30360.0}