fix unused access to optimise builtin methods which could lead to invalid C code being generated