Fix the argument of UnknownArgument exception

This change sets the real UnknownArgument instead of the last
valid one in the exception raised by the API.

Fixes bug #1201839

Change-Id: I22e1dadbe9a90e03e8ccfbcc6e0e8dc3f17c5a3e
(cherry picked from commit 384617f6ca98723cd9c1ad66d74c4cb827fdf42c)
Merge "Fix the argument of UnknownArgument exception" into stable/grizzly