See the ODK Forum discussion here. encode results in an error for dynamic selects from pre-loaded data. We have instructions in the help file for how to modify the do-file to account for such selects. However, it would be ideal for odkmeta to do this work itself, detecting such selects and modifying the do-file accordingly.