A company linked to the unauthorised demolition of the former Crooked House pub has been issued with a court order over environmental breaches at a neighbouring landfill site.