Revert "More small fixes for build restrictions"

This reverts commit 24155b0574fe21f48cdd4f888e48ade5a6cc8b4a.