I don't prefer the behavior, mIRC prefers the alias within its own file.

$isalias will return the alias defined in the current script in any event or alias, this is true in general and not limited to isalias: calling an alias defined both in the current script and somewhere else (order does not matter) the alias within the same script is called. Only if the alias is not defined within the current script will $isalias return one defined in another.

$null should not be returned in an unload event because the alias is still available within the event.

Code:
alias test return A
alias testA echo -ag $test $isalias(test).alias


Code:
alias test return B
alias testB echo -ag $test $isalias(test).alias
on *:load:{ echo -ag $test | echo -ag $isalias(test).alias | testB | testA }


Quote:
* Loaded script 'B.mrc'
-
B
test return B
B test return B
A test return A