Part of #599 (closed). Stack now compiles consistently in Foxy and Dashing and tests pass consistently in Dashing.