glob only returned directories if static_includes was present because
the return was in the wrong block.