Working around getindices with dynamically generated arrays in CFEngine 3