Remove Dashboard Access for Admins II

@aristath offered a great solution to remove dashboard access in a multisite install for all users, including sub-site admins, at https://premium.wpmudev.org/forums/topic/remove-dashboard-access-for-admins-as-well#post-674478. Unfortunately, the solution works on the main site as well, where I want to remove dashboard access only for subscribers. Any thoughts on how to accomplish this?