Test case and fix for register metadata update but (ISSUE-27), was
incorrect handling of version numbers when store updates register as
versioned resource entity
Additional checks and protection against bad updates