fixed a regression on duplicate definition detection