Various random fixes

Fix for substring lhs parsing, clean up asserts that fire in fcvs21
failures, other small fixes.