Fix #1836 by visiting the whole of a declaration's specifier looking for this particular error which actually affects the declaration, even though the error's not on the declaration.
Issue #1836: add a test.