Wrong order in instancof comparison