I think in your case the second one doesn't work again due to a too old genmsg version. Both features the _generate_messages_LANG targets as well as the _EXPORTED_TARGETS variable were introduced with 0.4.18 (see https://github.com/ros/genmsg/blob/groovy-devel/CHANGELOG.rst).