Using 'continue' in the last iteration of a 'for' loop would cause a stack empty exception