Revert changes related to SPARK-2678, decided to move them to another PR