Fixes #2058.
This tends to make much more efficient pterm usage compared to just throwing the problem at ABC