Glitch in jQuery code for bbPress reply form customization.

I've had some jQuery code made up to customize the way bbPress' reply form works, which generally includes moving the reply form beneath whatever reply the user chooses to reply to (without a refresh). This all works great when there are already existing replies on the page but I only just realized it creates a weird glitch when there isn't. On a topic with no replies, clicking "reply" on the topic removes the reply form from the page and the only way to get it back is to refresh the page entirely.

I've granted support access for the site and included the jQuery code in a support access message.

Thanks in advance!