Simple fix, just need to use to_unpacked_expression rather than to_expression here to deal with this.