DELTASPIKE-586 Forward compatibility for javax.interceptor.InvocationContext
DELTASPIKE-578 Move initialization before normal-scope flag
DELTASPIKE-581 Handle count queries without where-clause