I managed to resolve the issue by coping the entire webpart source code (in SharePoint Designer), and with Advanced Editing enabled, I pasted the code just before the end of the page. This however caused the webpart to not be editable from a web browser since the code was added in the protected/safe area of the page.
....
</table>
<div id="container">
<WebPartPages:DataFormWebPart ...... >
....
</WebPartPages:DataFormWebPart>
</div>
</asp:Content>