Fixed edge case in type-driven parsing