Derrick’s theorem beyond a potential