Using the reproducer available at http://gate.crashing.org/~fray/meta-test.tar.gz. A failure will occur when built with BB_NUMBER_PARSE_THREADS = "1". (Without that it MIGHT fail, already files as a different bug.) If you rename meta-test/recipes-core/busybox-oe-min/busybox.inc (and fix the reference to it in busybox-oe-min_1.19.4.bb, the error changes to: ERROR: The function busybox_cfg defined in busybox.inc was already declared in busybox-oe-min.inc. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names. ERROR: The function features_to_busybox_settings defined in busybox.inc was already declared in busybox-oe-min.inc. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names. ERROR: The function features_to_busybox_conf defined in busybox.inc was already declared in busybox-oe-min.inc. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names. ERROR: The function features_to_busybox_del defined in busybox.inc was already declared in busybox-oe-min.inc. BitBake has a global python function namespace so shared functions should be declared in a common include file rather than being duplicated, or if the functions are different, please use different function names. These are the error messages that should have been delivered (or something similar) even with two files of the same name.
The issue is that PythonMethodNode in ast.py uses self.modulename as a unique identifier for the insertion of the new method. If you have two identically named files, this breaks since one is parsed and the other is not. The issue is complicated by the issue only occurring if both files are parsed by the same process. In separate processes you don't see the conflict.
Patches on bitbake mailing list to resolve this.
Fixed in master with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=8bef99d3c85f48ff409eaebb964b1c45b203bdcf (there is cleanup in the following patches)