MDL-26405 restore - incorrectly thrown exception