Copies over base implementation from Rails' AbstractController::Layouts.