The bug
There are two users with the same name but different capitalization:
test
: 7c6d3775-9dd7-4934-9f2c-32303a367226Test
: d8d5a923-7b20-43d8-883b-1150148d6955
See namemc
Using the API (https://api.mojang.com/users/profiles/minecraft/<name>) you are only able to find the user with the name "Test", however the other user still exists:
https://api.mojang.com/user/profiles/7c6d37759dd749349f2c32303a367226/names
The "test" account is a non-paid legacy account, so it's no longer a valid account.