Added tests for wrong targets.
More target validation code.