Bugfix: fatal error when failed loops were included in slices. #1358