fix incorrect result of nodeHasOnlyImage function