The Modular Product Page Addon uses the products class to get the data. I retrieves all of the data from the products tables, so there is no need to modify the SQL query.
I don't know about that last line in the replacement code. It should probably go in the template (catalog/includes/modules/content/product_info/templates/cm_pi_name.php) but I don't know where that $header_tags_array gets defined. You could try something like
global $header_tags_array;
$product_info->products_name = $header_tags_array['title_alt'];
at the top of that file.
Regards
Jim