Ticket #5814: Handle A::B as template parameter for enum initializers.

Hi,

This patch fixes the ticket by properly handling {type, namespace} qualified types as template parameters for enum initializers. Thanks to consider merging.

Cheers,
  Simon