Improvements to program loop decoding