Fix potential problem with as: argument when invalid target is specified.