[KARAF-3055] Fix overlap with subshell starting with the same String