Check that API version is valid, and make sure it isn't set more than once