This reverts commit d30b88a6cc. As discussed in GH #3168, this works but it is not the proper way to fix the issue. See following commits.
d30b88a6cc