GROOVY-5870: Type checker should not disallow casting an interface to another interface