We got this error while executing our plugin. Within plugin we were making sql call to fileteredViews.
For impersonation we were making use of SETUSER keyword.
The plugin was working fine in development and test server. But started giving the error in case of Production.
We replaced SETUSER with EXECUTE AS USER and everything was fine than.