wp_reset_post_data() should be wp_reset_query().

It does what you tried to accomplish using this block, but in a correct way.

$wp_query = NULL;
$wp_query = $temp_query;

I fixed the problem locally but you may want to include the fix in future releases.