Fixed ClassCastException when (now deprecated!) usesTraditionalReflectiveProxies is set to true. Many thanks to Konrad Garus for reporting the issue.