Detect empty elements in dependency list

These errors are usually an extra trailing semi-colon, which is easy
to put in there for symmetry with the other lines. Give a warning on
this but proceed with the build as usual afterwards.