Improved with 865915d856bf9cc12e7559044948ef9871dbaad1 (as discussed offline).