Cxx: calling icxx with a string interpolation results in a cryptic BoundsError

This code used to work for me:

foo = @cxxnew makefoo();
icxx"$foo->bar = 5;"

But it now throws a rather cryptic error:

ERROR: BoundsError: attempt to access 36-element Array{Tuple{AbstractString,Symbol,Int64,Int64,Bool},1} at index [37]

which might be a result of interpolating $foo into the icxx command, as the string “$foo->bar = 5” happens to be 36 characters long after the interpolation? But I can’t tell.

A full backtrace would be helpful here.

Stacktrace:
 [1] getindex(::Array{Tuple{AbstractString,Symbol,Int64,Int64,Bool},1}, ::Int64) at ./array.jl:728
 [2] #s37#70 at /Users/glenhenshaw/.julia/packages/Cxx/UZsgx/src/cxxstr.jl:705 [inlined]
 [3] #s37#70(::Any, ::Any, ::Any, ::Any) at ./none:0
 [4] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at ./boot.jl:524
 [5] RMRCsetup(::Manipulator, ::Function, ::Array{Float64,1}, ::Float64, ::Float64, ::Float64, ::Float64, ::Array{Constraint,1}, ::Float64, ::Float64) at /Users/glenhenshaw/Code/RSGS/PositionControl/RMRC.jl:78
 [6] RMRCsetup at /Users/glenhenshaw/Code/RSGS/PositionControl/RMRC.jl:56 [inlined]
 [7] sam_trajectory() at /Users/glenhenshaw/Code/RSGS/PositionControl/SamTrajectory.jl:117
 [8] top-level scope at REPL[4]:1

Line 78 of “RMRC.jl” corresponds to the icxx call in the OP.