Add tests for issues 7245 and 7602

will merge in 24hrs