i can't use your patch because i don't have the [for] object, but i have had similar troubles that you described.  i can also only describe it as a bug.