add local variables to #extends too