Fixed regression in parsing of preprocessed entities.

Specifically we now store the pointer of the original declaration and check for duplicates.