Treatment of Layered Structures Using a Semilocal meta-GGA Density Functional