fixes #14380, also cleans up the code a bit and updates the primary GridContainerLite test to AMD, !strict