PHP: Add code to warn about duplicate entries

Such entries throw the error "'NoneType' object has no attribute 'getnotes'"
when converting to po using a template, which is hard to trace, so better
warn.