I came across a bug in my document whereby appendix sections (in an article) are referred to as sections, rather than as appendices. The problem is caused by the titlesec package. Here is an MWE:
The reference will appear "section A". If you unload the titlesec package, you will see "Appendix A" (typeset twice) (this bug was also reported here). Furthermore, if you change to a class with chapters, the problem disappears.