Handle invalid appversion in jpm validation (bug 1037201)

Fixes #372