Corrected implementation of validateOptions from api-utils

Previously, once `mapThrew` was set to true, it was never restored to `false`, causing keys to be missing on subsequent keys.

Attached bugfix and test.