HM: Fixed setting context based on docBase only if needed