automate basecode detection

allows proper basecode detection for tasks regardless of when basecode
is dropped by REX