[bc1a96407a] Partial solution should avoid crash, but may lead to wrong behavior.
Possible fix for testing.
test cases
fix [bc1a96407a]
merge trunk