#468 Close on select does not respect local declarations