Why is this query failing with invoker rights?
Because this is a new 12c security feature.

User x creates a harmless package and everyone starts using it, even users with higher privileges, like SYS.

Now user x knows that SYS uses this package regularly, so user x could replace the contents of this package with some malicious code any time and do anything in the database, knowing the code will be ran by SYS sooner or later.

12c prevents this with this new feature:

INHERIT PRIVILEGES and INHERIT ANY PRIVILEGES Privileges

But if SYS trusts x, the following can be done:

grant inherit privileges on user sys to x;


This will allow x to inherit the privileges of SYS when running code like the above.