bytecode analysis: copying to prevent indices/enumerators issues