Fix code duplication when allocated code is equal default code.