Running this script with your own bash path demonstrates the bug.
#!/home/ian/opt/bash/bash --norc
shopt -s extglob
shopt -s dotglob
cd $(mktemp -d)
mkdir a
touch a/.b
touch a/c
echo a/!(.b)
output:
a/. a/.. a/c
this happens with all bash versions 4.3+ (latest is patch 18).
before that, the output is:
a/c
Another related bug. man bash states:
The file names ``.'' and ``..'' are always ignored
when GLOBIGNORE is set and not null.
Which clearly implies that . and .. should not be ignored in some other
case. Well, that was not true before 4.3, but I'm guess this new
behavior is a bug, and the doc is a bug, since the doc hasn't changed,
and setting GLOBIGNORE doesn't actually make . and .. be ignored.