I think I figured it out. Apparently the “bad” mobile theme I posted an image of is the Jetpack Mobile theme. I disabled that in Jetpack and the mobile version isn’t showing up any more.
Aha! Using get_the_ID() did the trick. Funny what a difference 4 characters can make. Cheers!