added check for usage of effectively final in loops