Fix a dialyzer warning in generated code and add xref target to makefile

This is against 1.7-stable branch, is this correct?