Prevent adding end token on endless methods
#4042
+86
−0
Merged