The call to detect_arch() results in a call to KV_to_int() down the call stack. This call is completely useless in the global scope during ebuild sourcing and future versions of portage will die on this behavior. Please migrate them to pkg_setup() or a similar phase.
*** This bug has been marked as a duplicate of bug 586474 ***